{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/aqpimac/Dropbox/My_Folder/Papers-Projects/Wlezien-Enns-PSRM/Final-Feb2021/scripts/log-SI-tables.do.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 9 Feb 2021, 12:46:29

{com}. do "/var/folders/h1/hp0yzwm93w78bgxmmvf1zxzc0000gn/T//SD38542.000000"
{txt}
{com}. /* SI-tables.do
> # Philips, Andrew Q. "How to Avoid Incorrect Inference (While Gaining Correct Ones) in Dynamic Models". Forthcoming at Political Science Research and Methods. 
> # andrew.philips@colorado.edu
> # 2/9/21
> #
> # Tables produced in this R script:
> #   --SI, Table 1
> #       --SI, Table 2
> # ----------------------------------- */
. clear
{txt}
{com}. set seed 29209
{txt}
{com}. set obs 100
{txt}{p}
number of observations (_N)  was 0,
now 100
{p_end}

{com}. gen t = _n
{txt}
{com}. tsset t
{res}{txt}{col 9}time variable:  {res}{col 25}t, 1 to 100
{txt}{col 17}delta:  {res}1 unit
{txt}
{com}. gen x = rnormal()
{txt}
{com}. replace x =  rnormal() in 2/100
{txt}(99 real changes made)

{com}. gen y = rnormal()
{txt}
{com}. replace y = 0.8*l.y + 0*x + 3*l.x + rnormal() in 2/100
{txt}(99 real changes made)

{com}. 
. * SI, Table 1
. reg y l.y x l.x

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        99
{txt}{hline 13}{c +}{hline 34}   F(3, 95)        = {res}   603.88
{txt}       Model {c |} {res} 1964.92492         3  654.974974   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 103.038051        95  1.08461106   {txt}R-squared       ={res}    0.9502
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.9486
{txt}       Total {c |} {res} 2067.96297        98   21.101663   {txt}Root MSE        =   {res} 1.0414

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}           y{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}y {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7992255{col 26}{space 2} .0231388{col 37}{space 1}   34.54{col 46}{space 3}0.000{col 54}{space 4} .7532893{col 67}{space 3} .8451618
{txt}{space 12} {c |}
{space 11}x {c |}
{space 9}--. {c |}{col 14}{res}{space 2}-.0235432{col 26}{space 2} .1092623{col 37}{space 1}   -0.22{col 46}{space 3}0.830{col 54}{space 4}-.2404564{col 67}{space 3}   .19337
{txt}{space 9}L1. {c |}{col 14}{res}{space 2} 3.123813{col 26}{space 2} .1093029{col 37}{space 1}   28.58{col 46}{space 3}0.000{col 54}{space 4}  2.90682{col 67}{space 3} 3.340807
{txt}{space 12} {c |}
{space 7}_cons {c |}{col 14}{res}{space 2} .0630868{col 26}{space 2} .1124277{col 37}{space 1}    0.56{col 46}{space 3}0.576{col 54}{space 4}-.1601103{col 67}{space 3}  .286284
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est sto e1
{txt}
{com}. estout e1, style(tex) cells(b(star fmt(2)) se(par fmt(2))) // Table 1
{res}
            &          e1   \\
            &        b/se   \\
L.y         &        0.80***\\
            &      (0.02)   \\
x           &       -0.02   \\
            &      (0.11)   \\
L.x         &        3.12***\\
            &      (0.11)   \\
_cons       &        0.06   \\
            &      (0.11)   \\
{txt}
{com}. nlcom (_b[x] + _b[l.x])/(1-_b[l.y]) // calculated LR effect

       {txt}_nl_1:  {res}(_b[x] + _b[l.x])/(1-_b[l.y])

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}           y{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}_nl_1 {c |}{col 14}{res}{space 2} 15.44156{col 26}{space 2} 2.040297{col 37}{space 1}    7.57{col 46}{space 3}0.000{col 54}{space 4} 11.44265{col 67}{space 3} 19.44046
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. * SI, Table 2
. reg d.y l.y d.x l.x

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        99
{txt}{hline 13}{c +}{hline 34}   F(3, 95)        = {res}   335.36
{txt}       Model {c |} {res} 1091.21305         3  363.737684   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 103.038052        95  1.08461107   {txt}R-squared       ={res}    0.9137
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.9110
{txt}       Total {c |} {res}  1194.2511        98  12.1862357   {txt}Root MSE        =   {res} 1.0414

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}         D.y{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}y {c |}
{space 9}L1. {c |}{col 14}{res}{space 2}-.2007745{col 26}{space 2} .0231388{col 37}{space 1}   -8.68{col 46}{space 3}0.000{col 54}{space 4}-.2467107{col 67}{space 3}-.1548382
{txt}{space 12} {c |}
{space 11}x {c |}
{space 9}D1. {c |}{col 14}{res}{space 2}-.0235432{col 26}{space 2} .1092623{col 37}{space 1}   -0.22{col 46}{space 3}0.830{col 54}{space 4}-.2404564{col 67}{space 3}   .19337
{txt}{space 9}L1. {c |}{col 14}{res}{space 2}  3.10027{col 26}{space 2} .1682897{col 37}{space 1}   18.42{col 46}{space 3}0.000{col 54}{space 4} 2.766173{col 67}{space 3} 3.434367
{txt}{space 12} {c |}
{space 7}_cons {c |}{col 14}{res}{space 2} .0630868{col 26}{space 2} .1124277{col 37}{space 1}    0.56{col 46}{space 3}0.576{col 54}{space 4}-.1601103{col 67}{space 3}  .286284
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est sto e2, 
{txt}
{com}. estout e2, style(tex) cells(b(star fmt(2)) se(par fmt(2))) // Table 2
{res}
            &          e2   \\
            &        b/se   \\
L.y         &       -0.20***\\
            &      (0.02)   \\
D.x         &       -0.02   \\
            &      (0.11)   \\
L.x         &        3.10***\\
            &      (0.17)   \\
_cons       &        0.06   \\
            &      (0.11)   \\
{txt}
{com}. nlcom ( _b[l.x])/(-_b[l.y]) // calculated LR effect

       {txt}_nl_1:  {res}( _b[l.x])/(-_b[l.y])

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}         D.y{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}_nl_1 {c |}{col 14}{res}{space 2} 15.44156{col 26}{space 2} 2.040297{col 37}{space 1}    7.57{col 46}{space 3}0.000{col 54}{space 4} 11.44265{col 67}{space 3} 19.44046
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/aqpimac/Dropbox/My_Folder/Papers-Projects/Wlezien-Enns-PSRM/Final-Feb2021/scripts/log-SI-tables.do.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 9 Feb 2021, 12:46:42
{txt}{.-}
{smcl}
{txt}{sf}{ul off}